<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Docs for page logging_module.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">OFAPI<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                                      
                      		[ <a href="../classtrees_OFAPI.html" class="menu">class tree: OFAPI</a> ]
		[ <a href="../elementindex_OFAPI.html" class="menu">index: OFAPI</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">OFAPI</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_default.html">default</a><br />
              <a href="../li_OFAPI.html">OFAPI</a><br />
      	</div>
      <br />
                        <b>Files:</b><br />
        <div class="package">
				<span style="padding-left: 1em;"><a href="../OFAPI/_costants.php.html">costants.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_headers.php.html">headers.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_logging_module.php.html">logging_module.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_members_module.php.html">members_module.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_miscs_module.php.html">miscs_module.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_msgs_module.php.html">msgs_module.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_msg_sending.php.html">msg_sending.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_ofapi.php.html">ofapi.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_shared.php.html">shared.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_stats_module.php.html">stats_module.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_ucp_register.php.html">ucp_register.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../OFAPI/_user_module.php.html">user_module.php</a></span><br />
	  </div>
            <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Procedural File: logging_module.php</h1>
Source Location: /logging_module.php<br /><br />

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Page Details</div>
	<div class="nav-bar">
					<span class="disabled">Page Details</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">
				<table border="0" cellspacing="0" cellpadding="0">
			<tr><td><strong>Version:</strong>&nbsp;&nbsp;</td><td>v 1.0 2008/06/28</td></tr>
			<tr><td><strong>Copyright:</strong>&nbsp;&nbsp;</td><td>(c) 2008 Roberto Beretta (roberto.alpha@gmail.com) &amp; Daniele Margutti (malcom.mac@gmail.com)</td></tr>
			<tr><td><strong>Link:</strong>&nbsp;&nbsp;</td><td><a href="http://code.google.com/p/ofapi">http://code.google.com/p/ofapi</a></td></tr>
			<tr><td><strong>License:</strong>&nbsp;&nbsp;</td><td><a href="http://opensource.org/licenses/gpl-license.php">GNU Public License</a></td></tr>
	</table>

			</div>
</div>





	<a name="sec-functions"></a>
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Page Details</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">
			<a name="functionlogin" id="functionlogin"><!-- --></a>
<div class="evenrow">

	<div>
		<span class="method-title">login</span>&nbsp;&nbsp;<span class="smalllinenumber">[line 38]</span>
	</div>
<br />
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>integer login(
 $args&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table>

		<p align="center" class="short-description"><strong>Allows a registered user to login into the board.<br />
</strong></p>
<span class="description"><p>You need to provide 4 parameters inside the $args array. At this time we don't support new user registration directly via API.<br />  To create a new account you need to browse the board using a browser.<br /><br />  <strong>PARAMETERS</strong>: <ul><li><strong>$username</strong> 	<em>[string]</em>		registered username</li><li><strong>$password</strong> 	<em>[string]</em>		username associated password (in clean format)</li><li><strong>$autologin</strong> 	<em>[boolean]</em>	auto login the next time?</li><li><strong>$viewonline</strong> 	<em>[boolean]</em>	show user status in forum statistics?</li></ul></p></span>
    		<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$args:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>
	
<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Return:</strong>&nbsp;&nbsp;</td><td><strong>LOGIN_SUCCESS</strong> (login succeded)<br />                    <strong>LOGIN_ERROR_PASSWORD</strong> (wrong given password),<br />                    <strong>LOGIN_ERROR_ATTEMPTS</strong> (you have reached the maximum login attempts, your account was blocked)<br /></td>
  </tr>
  <tr>
    <td class="indent"><strong>See:</strong>&nbsp;&nbsp;</td><td>FUNCTION DOES NOT REQUIRE LOGIN (uh uh, that's a login function baby!)</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Version:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
  <tr>
    <td class="indent"><strong>Since:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
</table>

		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
	</div>
<a name="functionloginProtectedForumWithPassword" id="functionloginProtectedForumWithPassword"><!-- --></a>
<div class="oddrow">

	<div>
		<span class="method-title">loginProtectedForumWithPassword</span>&nbsp;&nbsp;<span class="smalllinenumber">[line 87]</span>
	</div>
<br />
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>integer loginProtectedForumWithPassword(
 $forum_id,  $password&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table>

		<p align="center" class="short-description"><strong>This function is used to login in a password-protected forum.
</strong></p>
<span class="description"><p>You should not use it directly but it's called when you use getTopicsFromForum function (to return the list of topics into the forum)  when you give a $forumPassword. <br /><br /></p><p><strong>PARAMETERS:</strong><br /> <ul><li><strong>$forum_id</strong> 	<em>[string]</em> 	the id of the forum you want to login<br /></li><li><strong>$password</strong> 	<em>[string]</em> 	given password to access<br /></li></ul></p></span>
    		<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$forum_id:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$password:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>
	
<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Return:</strong>&nbsp;&nbsp;</td><td><strong>LOGIN_FPSWD_OK</strong> you are successfully logged into the forum<br />                    <strong>LOGIN_FPSWD_ERR</strong> given password is wrong<br />                    <strong>LOGIN_PSWD_FORUM_ALREADYLOGGED</strong> you are already logged into the forum<br />                    <strong>LOGIN_FPSWD_WRONGFORUMID</strong> given forum id does not exist</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Version:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
  <tr>
    <td class="indent"><strong>Since:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
</table>

		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
	</div>
<a name="functionlogout" id="functionlogout"><!-- --></a>
<div class="evenrow">

	<div>
		<span class="method-title">logout</span>&nbsp;&nbsp;<span class="smalllinenumber">[line 200]</span>
	</div>
<br />
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void logout(
)</code>
    </td></tr></table>
    </td></tr></table>

		<p align="center" class="short-description"><strong>This function is used to logout an user.
</strong></p>
<span class="description"><p><br /><br />  <strong>PARAMETERS:</strong><br /> <ul><li><strong>Nothing</strong><br /></li></ul></p></span>
    
<br />
	
<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Version:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
  <tr>
    <td class="indent"><strong>Since:</strong>&nbsp;&nbsp;</td><td>1.0</td>
  </tr>
</table>

		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
	</div>
		</div>
	</div><br />

        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Wed, 30 Jul 2008 11:02:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>